<!DOCTYPE html>
<!--suppress ALL-->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<div id="b">
    <div class="col-md-6" style="margin-left: 25%">
        <form role="form" method="post" enctype="multipart/form-data" action="/user/save" onsubmit="return checkRegisterValue()">
            <h3 style="text-align: center">用户注册</h3>
            <div class="form-group">
                <p class="help-block" style="float: right">已有账号?去<a href="/toLoginPage"><span class="badge badge-pill badge-info" style="color: white">登录</span></a>
                </p>
            </div>
            <div class="form-group">
                <label for="name">用户名</label>&nbsp;&nbsp;
                <span id="userNameFail" style="color: red"></span>
                <span id="userNameSuccess" style="color: forestgreen"></span>
                <input type="text" class="form-control" id="userName" name="userName"
                       placeholder="请输入用户名" required="required" onblur="checkUserName(this.value)">
            </div>
            <div class="form-group">
                <label for="name">密码</label>
                <input type="password" class="form-control" id="passwordRegister" name="password"
                       placeholder="请输入密码" required="required">
            </div>
            <div class="form-group">
                <label for="name">确认密码</label>
                <input type="password" class="form-control" id="password2Register"
                       placeholder="请输入确认密码" required="required">
            </div>
            <div class="form-group">
                <p>头像</p>
                <label class="sr-only" for="inputfile">头像</label>
                <input type="file" id="inputfile" name="userImage" required="required">
            </div>
            <div class="form-group">
                <label for="name">昵称</label>
                <input type="text" class="form-control" id="nickName" name="nickName"
                       placeholder="请输入昵称" required="required">
            </div>
            <div class="form-group">
                <label for="name">邮箱</label>（用于找回密码）
                <span id="emailFail" style="color: red"></span>
                <span id="emailSuccess" style="color: forestgreen"></span>
                <input type="email" class="form-control" id="emailRegister" name="email"
                       placeholder="请输入邮箱" required="required" onblur="checkEmail(this.value)">
            </div>
            <div class="form-group">
                <label for="name">验证码</label>
                <input type="text" class="form-control" id="registerCode" name="imageCode"
                       placeholder="请输入验证码" required="required">
                <input type="button" class="btn btn-warning btn-sm" style="margin-top: 12px;" value="获取验证码"
                       onclick="setTime(this,1);getVerificationCode(1)">
            </div>
            <div style="text-align: center">
                <button type="submit" class="btn btn-primary">注册</button>
            </div>
        </form>
    </div>
</div>
</body>
</html>